package org.linlinjava.litemall.db.vo.marketing_manager;

/**
 * @author houzb
 * @Description
 * @create 2021-08-28 17:44
 */
public enum DeductionRuleStatEnum {

    NORMAL(1, "正常"),
    OFF_SHELF(2, "下架"),
    ;

    private int statVal;
    private String statDesc;

    public int getStatVal() {
        return statVal;
    }

    public void setStatVal(int statVal) {
        this.statVal = statVal;
    }

    public String getStatDesc() {
        return statDesc;
    }

    public void setStatDesc(String statDesc) {
        this.statDesc = statDesc;
    }

    DeductionRuleStatEnum(int statVal, String statDesc) {
        this.statVal = statVal;
        this.statDesc = statDesc;
    }

    public static String getStatDescByVal(int typeVal) {
        DeductionRuleStatEnum[] enums = DeductionRuleStatEnum.values();
        for(DeductionRuleStatEnum e:enums) {
            if(typeVal == e.getStatVal()) {
                return e.getStatDesc();
            }
        }
        return "未知类型";
    }
}
